﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Collections.Generic;

namespace OttawaTourMap.Models
{

    public class TourDetailsModel 
    {
      

        //Holds the data about all the stops
        private ObservableCollection<TourDetails> _tourDetails = null;
        public ObservableCollection<TourDetails> TourDetails
        {
            get
            {
                return _tourDetails;
            }

        }

       
        
        public TourDetailsModel()
        {
            _tourDetails = new ObservableCollection<TourDetails>();
            
        }

        public void addToCollection(TourDetails tourDetail)
        {
            _tourDetails.Add(tourDetail);
        }

       
        
    }

   
    //Tour Details Class
    public class TourDetails : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public TourDetails()
        {
           
        }

        public TourDetails(string title, string thumbNailUri,string duration)
        {
            _tourStopTitle = title;
            _tourStopImageURI = thumbNailUri;
            _tourStopDuration = duration;
            

        }

        private string _tourStopTitle = null;
        public string TourStopTitle
        {
            get
            {
                return _tourStopTitle;
            }

            set
            {
                if (value != null && !value.Equals(_tourStopTitle))
                {
                    _tourStopTitle = value;
                }
            }
        }

        private string _tourStopImageURI = null;
        public string TourStopImageURI
        {
            get
            {
                return _tourStopImageURI;
            }

            set
            {
                if (value != null && !value.Equals(_tourStopImageURI))
                {
                    _tourStopImageURI = value;
                }
            }
        }

        private string _tourStopDuration = null;
        public string TourStopDuration
        {
            get
            {
                return _tourStopDuration;
            }

            set
            {
                if (value != null && !value.Equals(_tourStopDuration))
                {
                    _tourStopDuration = value;
                }
            }
        }

        
        
    }
}
